<?php
class MProduce extends spModel{
	public $table = 'produce';
	public $pk = 'id';
		
	public function getAttributes(){
		return array(
			'name'=>'商品名',
			'introduce'=>'介绍',
			'explain'=>'详细',
			'marketPrice'=>'市场价',
			'memberPrice'=>'会员价',
			'smallImg'=>'缩略图',
			'bigImg'=>'大图',
			'hitNum'=>'点击',
			'buyNum'=>'购买数',
			'recommend'=>'推荐数',
			'recommendDate'=>'推荐日期',
			'productSort'=>'排序',
			);
	}

	//过滤不需要的字段
	public function getUnFilteAttributes(){
		return array(
			'name'=>'name',
			'introduce'=>'introduce',
			'explain'=>'explain',
			'marketPrice'=>'marketPrice',
			'memberPrice'=>'memberPrice',
			'smallImg'=>'smallImg',
			'bigImg'=>'bigImg',
			'hitNum'=>'hitNum',
			'buyNum'=>'buyNum',
			'recommend'=>'recommend',
			'recommendDate'=>'recommendDate',
			'productSort'=>'productSort',
			);
	}
	
	public function getAttributeFormsets(){
		return array(
			'name'=>array('type'=>'textField', 'htmlOptions'=>array()),
		);
	}
}